import { createStore } from 'vuex'

export default createStore({
  state: {
    foodorder:{//定义全局变量 记录预约的订单对象

    },
    user:{
      uid:1
    },
    token:"",//记录在线的令牌


  },
  getters: {
  },
  mutations: {
    setorder(state,a){
      state.foodorder=a;
    },
    setTk(state,token){
      state.token=token;
    },
    setUser(state,u){
      state.user=u;
    }
  },
  actions: {
  },
  modules: {
  }
})
